<!DOCTYPE html>
<html>
  <head>
    <title>delegate.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript" src="../javascript/lib/jquery-1.9.1/jquery-1.9.1.min.js"></script>
	<script type="text/javascript">
		$(function(){
			$("body").delegate("p" , "click" , function(){
				document.write("hited me!");
			}).css("color" , "green");
			/*
			$("#delegate").on("click" , "p" , function(){
				document.write("hited me.");
			}).css("color" , "red");
			*/
			
			/*
			//移除事件
			$("#delegate").off("click" , "p");
			*/
		})
	</script>
  </head>
  
  <body>
    <div id="delegate">
    	<p>hit me!</p>
    </div>
  </body>
</html>
